package com.ruoyi.knowledge.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 知识库文件切片对象 knowledge_file_segment
 * 
 * @author ruoyi
 */
public class KnowledgeFileSegment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 切片ID */
    private Long id;

    /** 文件ID */
    @Excel(name = "文件ID")
    private Long fileId;

    /** 切片内容 */
    @Excel(name = "切片内容")
    private String content;

    /** 切片序号 */
    @Excel(name = "切片序号")
    private Integer segmentIndex;

    /** 向量ID */
    @Excel(name = "向量ID")
    private String vectorId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    /** 文件名称（非数据库字段，用于展示） */
    private String filename;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    
    public void setFileId(Long fileId) 
    {
        this.fileId = fileId;
    }

    public Long getFileId() 
    {
        return fileId;
    }
    
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    
    public void setSegmentIndex(Integer segmentIndex) 
    {
        this.segmentIndex = segmentIndex;
    }

    public Integer getSegmentIndex() 
    {
        return segmentIndex;
    }
    
    public void setVectorId(String vectorId) 
    {
        this.vectorId = vectorId;
    }

    public String getVectorId() 
    {
        return vectorId;
    }
    
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("fileId", getFileId())
            .append("content", getContent())
            .append("segmentIndex", getSegmentIndex())
            .append("vectorId", getVectorId())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
} 